/**
 * 
 */
package com.eclipse.org.snms.summary;

import java.util.ArrayList;

import com.eclipse.org.snms.StickyNote;

public class SummarySubjectConcrete implements SummarySubject
{
	ArrayList<SummaryObserver> subscriberList;
	ArrayList<StickyNote> stickyNoteList;
	
	public SummarySubjectConcrete(){
		
		subscriberList = new ArrayList<SummaryObserver>();
		stickyNoteList = new ArrayList<StickyNote>();
	}
	
	public void subscribe(SummaryObserver SO) {
		subscriberList.add(SO);
	}

	public void unsubscribe(SummaryObserver SO) {
		
		subscriberList.remove(SO);
	}

	public void notify(StickyNote stickyNote)
	{
		for (SummaryObserver observer : subscriberList)
		{	
			observer.update(stickyNote,0);	
		}
	}

	
}

